//-------------------------------------------------------------------------
/**
   File:   typedef.h

   Descr.: - todo -

   Author: Stefan Leihkauf
   Date:   18.10.2014
*/
//-------------------------------------------------------------------------
#ifndef _TYPEDEF_H
#define _TYPEDEF_H

//-------------------------------------------------------------------------
/**
File:   cb_types.h

Descr.: common header file

Author: Stefan Leihkauf
Date:   8/8/2011
*/
//-------------------------------------------------------------------------
#ifndef _CB_TYPES_H
#define _CB_TYPES_H

/* windows */
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0601
#include <sdkddkver.h>
#endif

#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <tchar.h>

/* STL */
#include <string>
#include <vector>
#include <deque>
#include <map>
#include <list>
#include <sstream>
#include <fstream>
#include <iostream>
#include <algorithm> 
#include <functional> 
#include <cctype>
#include <locale>

/* boost */
#include <boost\smart_ptr.hpp>
#include <boost\noncopyable.hpp>
#include <boost\array.hpp>

/* boost */
#include <boost\regex.hpp>
#include <boost\uuid\uuid.hpp>
#include <boost\uuid\uuid_generators.hpp>

//-------------------------------------------------------------------------
#ifndef __BYTE
#define __BYTE
typedef char byte;
#endif

#ifndef __UCHAR
#define __UCHAR
typedef unsigned char uchar;
#endif

#ifndef __UBYTE
#define __UBYTE
typedef unsigned char ubyte;
#endif

#ifndef __USHORT
#define __USHORT
typedef unsigned short ushort;
#endif

#ifndef __UINT
#define __UINT
typedef unsigned int uint;
#endif

#ifndef __ULONG
#define __ULONG
typedef unsigned long ulong;
#endif

//-------------------------------------------------------------------------
/* this is maybe a more reliable version of defining a std::string
depending on unicode environment or not */
namespace std {
    typedef basic_string<TCHAR, char_traits<TCHAR>, allocator<TCHAR> >
        tstring;

    typedef basic_stringstream<TCHAR, char_traits<TCHAR>, allocator<TCHAR> >
        tstringstream;
}

//-------------------------------------------------------------------------
// the string type to use
typedef std::tstring StdString;

//-------------------------------------------------------------------------
// a list of strings
typedef std::vector<StdString> StringList;

//-------------------------------------------------------------------------
// a string stream
typedef std::tstringstream StringStream;

//-------------------------------------------------------------------------
// boost types
namespace boost {
    typedef basic_regex<TCHAR> tregex;
    typedef match_results<const TCHAR*> tcmatch;
    typedef match_results<std::tstring::const_iterator> tsmatch;
}

//-------------------------------------------------------------------------
// unique Id
typedef boost::uuids::uuid Uuid;

//-------------------------------------------------------------------------
// list of unique IDs
typedef std::vector<boost::uuids::uuid> Uuids;

//-------------------------------------------------------------------------
// unique Id generator 
typedef boost::uuids::string_generator UuidStringGenerator;

//-------------------------------------------------------------------------
// empty unique Id
static const Uuid NullUuid = boost::uuids::nil_uuid();

#endif //!defined _CB_TYPES_H

#endif //!defined _TYPEDEF_H
